﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using BUSINESS_OBJECT;

namespace CRM
{
    public partial class Index : System.Web.UI.Page
    {
        Custcls cust = new Custcls();
        STAFFI st = new STAFFI();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button2_Click(object sender, EventArgs e)
        {
            DataTable dt = cust.GetRecords(-99, "", "", "", "", -99, "",Convert.ToDateTime("1/1/1800"), -99,"", "",TBUNAME.Text,TBPSWRD.Text,"","", false, " and ");
         //   DataTable dt = st.GetRecords(-99, -99, "", "", "", "", -99, -99, "", Convert.ToDateTime("1/1/1800"), "", -99, false, " and ");
           if (dt.Rows.Count > 0)
           {
               Session["CID"] = dt.Rows[0]["CID"].ToString();
               Response.Redirect("~/customer/home.aspx");
           }
           else
             lbllogin.Text  ="invalid usre name password";

        }
    }
}
